import asyncio

from backend.danwen.dquestion_milvus import SQLiteDatabaseRAG


async def train_data():
    rag=SQLiteDatabaseRAG()
    await rag.create_index()
    # rag.train(question="哪些国家的发票最多?",sql="""SELECT BILLINGCOUNTRY, COUNT(INVOICEID) FROM INVOICE GROUP BY 1 ORDER BY 2 DESC""")
    # rag.ask("哪些国家的发票最多?")
    print(123,rag.get_training_data())

if __name__ == '__main__':
    asyncio.run(train_data())

